<template>
  <div style="display: flex">
    <CloudCascader
      style="width: 360px"
      :field-names="{ label: 'name', value: 'code', children: 'items' }"
      :options="options"
      placeholder="Please select"
      @change="onChange"
    >
    </CloudCascader>
  </div>
</template>

<script>
  const options = [
    {
      code: 'zhejiang',
      name: 'Zhejiang',
      items: [
        {
          code: 'hangzhou',
          name: 'Hangzhou',
          items: [
            {
              code: 'xihu',
              name: 'West Lake',
            },
          ],
        },
      ],
    },
    {
      code: 'jiangsu',
      name: 'Jiangsu',
      items: [
        {
          code: 'nanjing',
          name: 'Nanjing',
          items: [
            {
              code: 'zhonghuamen',
              name: 'Zhong Hua Men',
            },
          ],
        },
      ],
    },
  ];
  export default {
    title: '6.自定义字段名',
    subTitle: '自定义字段名。',
    data () {
      return {
        options,
      }
    },
    methods: {
      onChange (value) {
        console.log(value);
      },
    }
  }
</script>

<style lang="scss">
</style>